package classes.events
{
	import flash.events.Event;

	public class MySqlErrorEvent extends Event
	{
		public static const MYSQL_ERROR:String = "mysqlError";
		
		public var error:Object;
		public var errorType:String;
		public var details:String;
		public var status:String;
		
		public function MySqlErrorEvent( type:String, error:Object )
		{
			super( type );
			
			if( error.faultString )
			{			
				this.error = error.faultString;
			}			
			else
			{
				this.error = null;
			}
			
			this.details = error.details;
			this.status = error.status;
			this.errorType = error.errorType;
		}		
		

		override public function clone():Event 
		{
            return new MySqlErrorEvent( type, error );
        }		
	}
}